home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
GRAPHICS
/
MAKEJPEG.ZIP
/
!MakeJPEG
/
!Help
/
!Help
next >
Wrap
Text File
|
1996-03-23
|
28KB
|
577 lines
____________________________________________________________________________
‘ M a k e J P E G ’
JPEG Image Compression and Decompresssion Toolkit
JPEG utilities by The Independent JPEG Group
version 6a (07 Feb 1996)
Desktop front-end application by Dave Thomas, © 1992-5
version 2.04 (23 Mar 1996)
____________________________________________________________________________
Introduction ______________________________________________________________
JPEG is a compression system for real-world pictures. By ‘real-world’
pictures I mean photographic images, often referred to as ‘continuous-
tone’. It is a ‘lossy’ format, meaning that not all the information you
feed in to it gets stored and some image detail is lost. What’s remarkable
about the JPEG system is the size of the files it produces, they are
_extremely_ small for the data they contain. It enables you to squeeze many
megabytes of imagery onto a single floppy disc.
The JPEG system must be treated carefully if you want optimum compression
and image quality. This ‘toolkit’, based on the work of The Independent
JPEG Group, has been created to enable users to ‘master’ high-quality JPEGs
by allowing them to fine-tune the parameters available.
MakeJPEG requires a hard disc, as the utilities it uses run straight from
disc. It must be pointed out here that MakeJPEG is _not_ a program for
novices, as some of its options are quite cryptic, it is really intended for
graphics hackers like myself, who can entertain themselves for hours
creating ‘funny’ JPEGs. If you want an image viewer, go for FYEO,
ChangeFSI, Translator or [myveryown] Pix instead.
In particular, MakeJPEG doesn’t support RISC OS Sprites, although it is
likely that I will add it in a future version (maybe ;). The image formats
it uses are Windows BMPs, OS/2 BMPs, CompuServe GIFs, Truevision Targas and
Portable Bitmaps, so you need an external image ‘renderer’ to view the
images such as those mentioned above.
If you have used a version of MakeJPEG prior to this, please note that
this version is radically different from version 1.09, the last release of
some time ago. Ensure you read the manual well.
Usage _____________________________________________________________________
The operation of MakeJPEG is divided into four areas, which are :
• Compression of standard images into the JPEG format,
• Decompression of JPEG images to standard formats,
• Translation of JPEG images between its different variations,
and • A facility for adding Comments and messages to JPEG images.
They each have a window of their own from which you can control how they
behave.
Clicking the Select button on MakeJPEG’s iconbar icon will open the
MakeJPEG Deompression window, clicking with Adjust will open the MakeJPEG
Compression window. The other windows are accessible by using the iconbar
menu. The contents of these windows are discussed below.
As MakeJPEG is just a desktop controller for a set of command-line
programs, certain conventions are adhered to to maximise efficiency. Each
option button controls the presence of a command-line ‘switch’. If a switch
is not signalled as being on then the utilities will assume some default
value for that option. This is particulary relevant for the compression
quality setting - if the option isn’t on, then a default quality setting
will be used. Be careful that you always specify exactly what you want.
The three main windows (Compress, Decompress and Translate) are divided
into sections, consisting of Basic Options, Advanced Options and Wizard
Options. These sections refer to the general complexity-level of the
options contained within. ( Wizard options are intended for people with
brains the size of small citys. :)
The Compress and Translate both also have another section called 'Comment
Options' which controls whether comment blocks will automatically be
included in the file.
In the following text I will use ‘[€]’ to represent option buttons and
‘(*)’ to represent radio buttons. Beneath each option or radio ‘symbol’
will be a description of what it does. Some of the descriptions I have used
(for example the one on restart markers) are just duplicates as their action
doesn‘t change across the different utilities.
‘MakeJPEG Decompression’ __________________________________________________
This window controls the conversion of JPEG images to the more usual
bitmap formats. Dragging a JPEG to the decompression window will pop-up a
save box containing a bitmap image icon. Drag this icon to a filer window
to convert the JPEG.
Basic Options _____________________________________________________________
Output file-format (a group of radio icons)
These radio icons determine the output image file-format to be used. The
only format which can’t take the full output it is GIF which can only do up
to 8bpp output. When using GIF the number of output colours automatically
gets reduced to a maximum of 256 colours.
[€] Reduce image to ... colours
This option allows you to reduce the amount of colours in the output image
from 24bpp or 8bpp grey, to whatever number you specify in the writable.
However, the value must be at most 256 and at least 8.
[€] Fast, low-quality output
This is a sort of macro-option; it implies fast inverse-DCT, low-quality
upsampling, one pass quantisation and ordered dither. It’s there for when
you want speedy output.
[€] Force greyscaled output
This will make any output files appear in shades of grey in up to 8bpp
(256 colours - the maximum amount for grey).
[€] Scale output by ...
When on, this will scale down the size of the output image by the
specified scale factor, useful for previews of large images. The available
scale factors are a half, a quarter and an eighth. Output is much faster
when it is scaled down.
Advanced Options __________________________________________________________
[€] Verbosity
This allows you to control how ‘talkative’ the decompressor is. When off,
the decompressor will not produce any text-messages, except for error
messages. When on, it will give some details about the image being
decompressed. The low setting will display details about what tables and
markers are held in the file, the high setting will go further and display
the contents of the tables. With verbose on you must press Space to
continue when the compressor has finished its processing.
[€] DCT method
This selector controls how the inverse Discrete Cosine Transform (the
basic JPEG decompression step) is carried out. The available options are :
• Fast - Faster, less accurate decompression.
• Integer - Medium speed and accuracy, the default.
• Floating-Point - Slow, high accuracy decompression.
Fast is useful for preview images, but Integer is of a higher quality.
Floating-Point is too slow for general use, unless you’ve got an SGI Indy2
doing your FP for you :).
[€] Dithering method
This selector allows you to choose which dithering method is used when
converting images down to 256 or less colours. The available methods are :
• (none) - No dithering is performed, low quality. yuk!
• Ordered - ‘Ordered’ dithering is used, medium quality and
speed. Ordered dithering only works when
one-pass quantisation (see below) is selected.
• Floyd-Steinberg - ‘Floyd-Steinberg’ error-spreading is used, it
is the highest quality but also the slowest.
This is the default setting.
[€] Map output to image colours
By selecting this option and dragging a GIF or PPM file to the drop-arrow
to the right of the option, the output file’s colours will be mapped on to
the colours used by the file you specify.
[€] Faster, lower-quality upsampling
When selected this will make the decompressor use a faster, lower-quality
upsampling routine. This provides a a speedup with a corresponding quality
drop.
[€] One-pass colour quantisation
This makes the decompressor use one-pass instead of two-pass colour
reduction. The one-pass method is faster and needs less memory, but it
produces a lower-quality image. This option is ignored unless you also set
the ‘Reduce image to ... colours’ option.
[€] Maximum memory
You can safely ignore this, it’s only provided for completeness. It
controls how much memory the decompressor will constrain itself to using.
‘MakeJPEG Compression’ ____________________________________________________
This window controls the conversion of bitmap images into JPEG format.
Dragging a BMP, GIF, Targa or PBM image to the compression window will
pop-up a save box containing a JPEG icon. Drag this icon to a filer window
to convert the image.
Basic Options _____________________________________________________________
[€] Image quality
This option allows you to set the quality level, as a percentage. This
roughly determines the level of detail that will be kept from the original
file and consequently the output file size. By default this is set at 75%
but you can change this by either entering a new value in the writable icon
or adjusting the existing value by using the up and down icons. 85% is a
good ‘high-quality’ setting.
Note that really low settings of about 0% to 5% cause the image to be
distorted beyond all recognition. If you use quality settings of 0% to 23%
you will get a message saying that ‘the quantisation tables are too coarse
for baseline JPEG’ files, this means that the quality of the picture is
below that of the agreed limits, if you make files like this they are less
likely to be compatible with other JPEG reading software. However, you can
use the ‘Force baseline JPEG’ option to ensure compatability.
[€] Make colour input greyscale
This will make the compressor ‘see’ the input file as levels of grey, so
the resulting JPEG file will also be grey. Grey files are smaller, as they
store no colour data, but they’re pretty useless unless you want to store
your John Major photo collection. ;)
[€] Optimisation of entropy encoding parameters
When this is set MakeJPEG will try to optimize the encoding tables in the
output file, making it smaller, with no change in the image quality. This
function will need more memory and take more time to run though. The
optimised files tend to be about 1-2K smaller, which is well worth it on
smaller files but not so neccessary with large scanner-type images.
[€] Create progressive (multiple-scan) file
Most JPEG files are stored as one top-to-bottom ‘scan’ of image data.
Progressive JPEG allows you to store a JPEG as a series of scans of
increasing quality which build up into the final image. It iss similar in
concept to interlaced GIF images, but it can also work with the colour
components of the image. This is a new facility, not really available in
many other decoders (especially Acorn-based decoders) so it should be used
with caution. When this option is on, MakeJPEG will create a default-order
progressive image.
Advanced Options __________________________________________________________
[€] Verbosity
This allows you to control how ‘talkative’ the compressor is. When off,
the compressor will not produce any text-messages, except for error
messages. When on, it will give some details about the image being
compressed. (The low and high setting isn’t worth using for compression as
the compressor app seems very uptight about giving info out.) With verbose
on you must press Space to continue when the compressor has finished its
processing.
[€] DCT method
This selector controls how the Discrete Cosine Transform, the basic JPEG
compression step, is carried out. The available options are :
• Fast - for faster, less accurate compression.
• Integer - the default, medium speed and accuracy.
• Floating-Point - for slow, high accuracy compression.
I wouldn’t recommend using Fast for any important work or floating-point
for everyday use.
[€] Smooth input image
This will smooth over the input image data by the specified percentage,
this is provided primarily to remove dither patterns from the input which
will in most cases ensure it compresses better. Setting the percentage too
high will visibly blur the image, so be warned!
[€] Restart marker every
This option controls the insertion of extra control bytes in the file to
help make sure the file, if it gets corrupted, does not loose too much data.
This will make the file larger though. The writable icon controls how many
restart markers will be placed in the file and the two option buttons below
it control where they will be put. For example, setting the restart marker
to 20 and selecting the ‘Blocks’ option, place a restart marker every twenty
blocks (JPEG images are divided into blocks of 16x16 pixels). This option
is provided for those transferring images over unreliable networks such as
with continent-to-continent Internet access. Images with unwanted restart
markers can have them removed by processing the file through the ‘Translate’
facility.
[€] Maximum memory
You can safely ignore this, it’s only provided for completeness. It
controls how much memory the compressor will constrain itself to using.
Wizard Options ____________________________________________________________
Refer to the ‘wizard’ document for more information on these options as
they are quite complicated.
[€] Force baseline JPEG to be made
This is only applies to people wanting to make really low-quality files.
This controls whether the quantisation tables will be constrained to an
8-bit range, as some JPEG implementations will not allow 16-bit
quantisation tables.
[€] Use quantisation tables file
When this option is on and you have dragged a text file to the shaded
down-arrow, then the text file will be passed to the compressor as a table
detailing the quantisation tables to use when compressing a file. Click on
the arrow to be informed of the name of the file that is currently set.
[€] Set quantisation tables
With this option on, the contents of the writable icon next to it will be
passed to the compressor to tell it which quantisation tables to use when
compressing an image.
[€] Set sampling factors
This option controls the reduction of quality when making the JPEG file.
It’s occasionally useful for some JPEG software which relies on certain
sampling factors.
[€] Specify scan sequence
By setting this option and dragging a text file to the drop-arrow next to
it, the compressor will be instructed to use the specified file as a
description of the ordering of the scans to be emitted. For progressive
JPEGs it specifies the progression parameters.
Comment Options ___________________________________________________________
[€] Include a Comment Block as per Comments window
This option will automatically post-process the file, as if it had been
dropped on the 'Insert Comment Block' section of the Comments window. All
choices currently in operation in the Comments window will be used. This
option requires a scrap directory to be set up.
‘MakeJPEG Translation’ ____________________________________________________
This window controls features you can change in a JPEG file once it’s been
compressed. For example you can add in restart markers, or turn it into a
progressive JPEG. This doesn’t affect the image data as no compression or
decompression is taking place.
To translate a file you drag it to the translation window, a save box
will pop up with a JPEG file icon in it. Drag this icon to a filer window
to translate the image.
Basic Options _____________________________________________________________
[€] Optimisation of entropy encoding parameters
When this is set MakeJPEG will try to optimize the encoding tables in the
output file, making it smaller, with no change in the image quality. This
function will need more memory and take more time to run though. The
optimised files tend to be about 1-2K smaller, which is well worth it on
smaller files but not so necessary with large-scan size images.
[€] Create progressive (multiple-scan) file
Most JPEG files are stored as one top-to-bottom ‘scan’ of image data.
Progressive JPEG allows you to store a JPEG as a series of scans of
increasing quality which build up into the final image. It iss similar in
concept to interlaced GIF images, but it can also work with the colour
components of the image. This is a new facility, not really available in
many other decoders (especially Acorn-based decoders) so it should be used
with caution. When this option is on, MakeJPEG will create a default-order
progressive image.
Advanced Options __________________________________________________________
[€] Verbosity
This allows you to control how ‘talkative’ the translator is. When off,
the translator will not produce any text-messages, except for error
messages. When on, it will give some details about the image being
decompressed. The low setting will display details about what tables and
markers are held in the file, the high setting will go further and display
the contents of the tables. With verbose on you must press Space to
continue when the translator has finished its processing.
[€] Restart marker every
This option controls the insertion of extra control bytes in the file to
help make sure the file, if it gets corrupted, does not loose too much data.
This will make the file larger though. The writable icon controls how many
restart markers will be placed in the file and the two option buttons below
it control where they will be put. For example, setting the restart marker
to 20 and selecting the ‘Blocks’ option, place a restart marker every twenty
blocks (JPEG images are divided into blocks of 16x16 pixels). This option
is provided for those transferring images over unreliable networks such as
country-to-country Internet. Images with unwanted restart markers can have
them removed by processing the file through the ‘Translate’ facility.
[€] Maximum memory
You can safely ignore this, it’s only provided for completeness. It
controls how much memory the translator will constrain itself to using.
Wizard Options ____________________________________________________________
[€] Specify scan sequence
By setting this option and dragging a text file to the drop-arrow next to
it, the translator will be instructed to use the specified file as a
description of the ordering of the scans to be emitted. For progressive
JPEGs it specifies the progression parameters.
Comment Options ___________________________________________________________
[€] Include a Comment Block as per Comments window
This option will automatically post-process the file, as if it had been
dropped on the 'Insert Comment Block' section of the Comments window. All
choices currently in operation in the Comments window will be used. This
option requires a scrap directory to be set up.
‘MakeJPEG Comments’ _______________________________________________________
The comments window allow you to add textual messages to JPEG files and
delete existing messages. It also allows you to read any comments present
in JPEG files.
Extract Comment Block _____________________________________________________
This section allows you to extract any comments present in the JPEG file
to a text file for inspection. It works slightly differently to the other
windows in that you must drag your JPEG to the drop-arrow. When you drag it
to the drop-arrow a save box will pop-up for you to save the text file from.
[€] Include image dimensions
This option will cause other information to be included in the extracted
comment textfile. This will usually be the image’s dimensions and the JPEG
process it was encoded by.
Insert Comment Block ______________________________________________________
This section takes a JPEG file and outputs a JPEG file, adding in
whatever comments you want stored.
(*) Short comment
By entering text in the writable icon and selecting this radio button, the
specified text will be added to the JPEG as a comment. You can enter up to
a maximum of 64 characters this way. If you leave the writable icon blank,
this will _not_ be added to the file as a comment.
(*) Long comment from file
This radio button controls whether a specified text file will be used as
the comment text. You specify the text file by dragging it to the dop-arrow
to the right of the radio button. By using this method you can insert more
than 64 characters of text into the JPEG file. The maximum size of any one
comment ‘block’ is 64 Kbytes. If you need more than this (!) then you can
just keep inserting more blocks.
[€] Delete existing comments
If selected, this will remove any existing comments from the processed
JPEG file.
Notes _____________________________________________________________________
• Memory: It's next to impossible to predict how much memory the utilities
will need, so MakeJPEG makes no effort to do so. You cannot control how
much memory they use by setting the Next slot in the Task Manager as they
can claim from the Free pool. They will resort to using temporary files
where necessary. In general, Translate is the most memory hungry feature.
Don't ever allocate less than 100K as the utilities may not be able to
unsqueeze themselves and initialise properly, giving a cryptic error.
• The utilites, wot dus der work like, with their associated documents is
in the !MakeJPEG.Resources.JPEG directory. These utilities may be
distributed separately from MakeJPEG since I did not write them, please
read the JPEGinfo document for further information.
• Errors, when they happen, will generally just report the error and leave
an empty JPEG file on the disc.
• Holding down Ctrl when dropping a JPEG on MakeJPEG (any window) is
equivalent to dropping a JPEG in the Translation window.
• Handing MakeJPEG a file with a "/JPG" extension on the filename will
remove it from the output filename.
• Users of the LongFilenames utility: MakeJPEG won’t accept long output
filenames. :( I think this is a C Library problem.
To Do _____________________________________________________________________
What fun things are happening in the magical world of MakeJPEG ;-) ...
• Fix hourglass problem.
• Sprite support for cjpeg and djpeg.
• Re-code the entire thing in C as a stand-alone FYEO-style thing. (!)
Updates ___________________________________________________________________
0.01+- Development versions
1.00 (01 Jan 1993)
- First usable version (not released)
1.01 - Wimp$Scrap detector for app-app transfer implemented
- Checks for when someone uses Wimp$Scrap for both input and output
files, i.e. Save from Edit with save to Edit. Still some bugs tho.
1.02 - Didn’t realise that the cjpeg app could use GIF as input, does now
though - taa daa!
- New paned main Control window and Status window added with timing and
in/out filetype & size sections.
- Some filer and app icons/ptrs changed.
- Docs enhanced/changed in various places.
- Save & Default configuration option added.
- New ‘Fast mode’ & ‘Verbose’ options added.
- Stops you using same in/out files.
1.03 - Minor fault in startup file recogniser corrected.
- New creator apps ‘stolen’ from Translator (apps are version 4).
- New windows, options, docs.
1.04 - Problems associated with RISC OS 2 cured (Clib/FPEm/DragASprite)
- Various personal additions
- DragASprite fiddly bits fiddled
- Doc ‘slimmed’.
1.05 - Insignificantly small changes not woth mentioning.
1.06 - Rewrote the very nasty configuration load/save routines. Saves
quantization tables filename in config file now.
- Added ‘Extra verbose’ option.
1.07 - Minor changes to Status window and Save box
- Centres windows to the screen when you open them
1.08 - Fixed adjust-drag of icon in save box bug (no drag icon was
appearing)
- Removed the non-functional icons from templates (JFIF/TIFF and coding
icons)
- Included the new ‘official’ JPEG Sprite.
1.09 (02 May 1994)
- Fixed innumerable bugs...
- Messed around with docs
1.20 - Interim v5 app version, some bugger switched the progress display on
though. :(
2.00 (07 Oct 1995)
- Complete rewrite of front-end, had little choice, 1.09 was
desparately tied to the version 4 apps. :(
- Got the source and built the apps myself this time. (This sounds
familiar! ;)
- Uses the brand-spanking-new version 6 apps.
- New jpegtran & comment utils.
- Doc rewrote, again had little choice.
- Uses my new !Help-text displayer.
2.01 (08 Oct 1995)
- Added the hourglass percentage display to cjpeg, djpeg & jpegtran.
2.02 (03 Nov 1995)
- The compression window’s writable icon checks were correcting the
wrong icons.
- Dragging a JPEG to MakeJPEG with Ctrl held causes ‘Translate’ to be
used rather than ‘Decompress’. Saves keeping the Translate window
open.
2.03 (09 Dec 1995)
- Recompiled binaries with -Otime and -Dshort=int (!) to give a _very_
marginal speedup. Might use more memory however.
- Swapped around the iconbar click action, now Select open the
Decompress window and Adjust opens the Compress window, I've made it
this way as images are decompressed far more often than they are
compressed.
- Fixed the somewhat silly window opening code, to not force the whole
window open.
- Added an 'add comments' option to the Compress and Translate windows
which automatically adds the currently specified comment to output
JPEGs. Needs Wimp$Scrap though.
- The JPEG FAQ is now included with the distribution to save me
answering any nasty questions. ;-)
- 'Useful' directory included with some GIFs that act as palettes for
mapping images to.
2.04 (23 Mar 1996)
- Now uses the version 6a applications.
- Many of the fiddlings with the applications mentioned above have been
omitted for the sake of reliability.
- OSLib is used to control the hourglass now, rather than DeskLib.
- HelpFile 1.02 used.
Copyright & Contact Addresses _____________________________________________
This software (the ‘front-end’ software) is copyright of David Thomas, it
is supplied "as is"; using it is entirely at your own risk. I make no
warranty as to the fitness of this software for any purpose. You are free
to distribute this application to anyone you please, as long as you are not
supplying it for personal gain and it is delivered with all the supplied
files unaltered.
This software is based in part on the work of the Independent JPEG Group.
See the separate IJG documentation for details of the copyright of the
utilities. The source for the IJG JPEG v6 apps, in RISC OS form, is
available from me or my web pages if you want it.
If you have any comments, bug reports, suggestions for future versions or
anything else don’t hesitate to contact me at -
SnailMail : Dave Thomas
20 Rosebery Avenue
Waterloo
Liverpool
L22 2BH
E-mail : CMSDTHOM@livjm.ac.uk
WWW : http://www.cms.livjm.ac.uk/www/homepage/cmsdthom/index.htm
____________________________________________________________________________